
PAPI_HOME=$(HOME)/pp
TARGET=\
 test-single-counter-pmc \
 test-single-counter-papi \
 test-multi-counter-pmc \
 test-multi-counter-pmc2 \
 test-multi-counter-papi

tests: $(TARGET)

test-single-counter-pmc: test-single-counter-pmc.c
	gcc -g -Wall -o $@ $< -lpmc

test-single-counter-papi: test-single-counter-papi.c
	gcc -DDEBUG -g -Wall -o $@ $< -I$(PAPI_HOME)/include -L$(PAPI_HOME)/lib -lpapi -lpmc 

test-multi-counter-pmc: test-multi-counter-pmc.c
	gcc -g -Wall -o $@ $< -lpmc

test-multi-counter-pmc2: test-multi-counter-pmc2.c
	gcc -g -Wall -o $@ $< -lpmc

test-multi-counter-papi: test-multi-counter-papi.c
	gcc -DDEBUG -g -Wall -o $@ $< -I$(PAPI_HOME)/include -L$(PAPI_HOME)/lib -lpapi -lpmc 

clean:
	rm -fr $(TARGET)
